//
//  VerticalButton.swift
//  APPTestSwift
//
//  Created by hiking on 2020/3/24.
//  Copyright © 2020 hiking. All rights reserved.
//

import UIKit

class VerticalButton: UIButton {
    override func layoutSubviews() {
        super.layoutSubviews()
        self.imageView?.frame = CGRect(x: self.frame.size.width/6, y: 0, width: self.frame.size.width/3*2, height: self.frame.size.height/3*2)
        self.titleLabel?.frame = CGRect(x:0,y: self.frame.size.height/3*2,width: self.frame.size.width,height: self.frame.size.height/3)
        self.titleLabel?.textAlignment = NSTextAlignment.center
        self.titleLabel?.adjustsFontSizeToFitWidth = true
    }
}
